<!DOCTYPE html>
<html>
<head>
    <title>API</title>

    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    
        <div id="example" class="k-content">
			<div class="configuration" style="width: 220px">
				<span class="configHead">API Functions</span>
				<ul class="options">
					<li>
					   <button id="get" class="k-button">Get value</button>
				   </li>
				   <li>
					   <input id="value" value="10/10/2000" style="float:none" />
					   <button id="set" class="k-button">Set value</button>
				   </li>
					<li>
						<button id="enable" class="k-button">Enable</button> or <button id="disable" class="k-button">Disable</button> or <button id="readonly" class="k-button">Readonly</button>
					</li>
					<li>
						<button id="open" class="k-button">Open</button> or <button id="close" class="k-button">Close</button> the calendar
					</li>
				</ul>
			</div>

            <div class="demo-section">
                <input id="datepicker" />
            </div>
            <script>
                $(document).ready(function() {
                    $("#datepicker").kendoDatePicker()
                                  .closest(".k-widget")
                                  .attr("id", "datepicker_wrapper");

                    var datepicker = $("#datepicker").data("kendoDatePicker");

                    var setValue = function () {
                        datepicker.value($("#value").val());
                    };

                    $("#enable").click(function() {
                        datepicker.enable();
                    });

                    $("#disable").click(function() {
                        datepicker.enable(false);
                    });

                    $("#readonly").click(function() {
                        datepicker.readonly();
                    });

                    $("#open").click(function() {
                        datepicker.open();
                    });

                    $("#close").click(function() {
                        datepicker.close();
                    });

                    $("#value").kendoDatePicker({
                        change: setValue
                    });

                    $("#set").click(setValue);

                    $("#get").click(function() {
                        alert(datepicker.value());
                    });
                });
           </script>
           <style scoped>
	            .demo-section{
		            width:155px;
                    margin-right: 360px;
	            }
            </style>
        </div>

</body>
</html>
